package Hot100.Medium.BinarySearch;

public class LC153 {
    public static void main(String[] args) {

    }

    public int findMin(int[] nums){
        int n = nums.length;
        int left = -1;
        int right = nums.length - 1;
        while(left + 1 < right){
            int mid = left + (right - left) / 2;
            if(nums[mid] > nums[n -1]){
                left = mid;
            } else {
                right = mid;
            }
        }
        return nums[right];
    }
}
